﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HKEA.CMS.Core.IDAL;
using HKEA.CMS.Core.Models;
using HKEA.CMS.Core.Utility;
using HKEA.CMS.Core.DALFactory;
using System.Linq.Dynamic;

namespace HKEA.CMS.Core.DAL
{
    public class ImCreateCodeDAL:IImCreateCode
    {
        private static ImCreateCodeDAL dal = null;
        private static object obj = new Object();
        HKEA_CMSEntities model;
        imCreateCode imcreateCode;

        private ImCreateCodeDAL()
        {
            model = DataAccess.GetModelInstance();
            imcreateCode = model.imCreateCode.CreateObject();
        }

        public static ImCreateCodeDAL GetInstance()
        {
            if (dal == null)
            {
                lock (obj)
                {
                    if (dal == null)
                    {
                        dal = new ImCreateCodeDAL();
                    }
                }
            }
            return dal;
        }

    }
}
